<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<h1>JS 数值</h1>
	<hr>
	<script>
		var num =123;
		var num =017;//8进制 0~7
		var num =0b110;//2进制0~1
		var num =0xff;//16进制 0~9a~f
		var um =3e3; //科学计数法
		var num =3e-3;

		//Not a Number
		varnum =NaN;
		console.log('值',num);
		console.log('类型',typeof(num));
		console.log(NaN+100);
		if (NaN) {
			console.log(''Yse);
		} else{

		console.log('No');
		}
		if (NaN) {
			console.log('Yes');
		}else{
			console.log('No');
		};

		//数值转换
		//Number() parseInt() parseFloat()
		
		var a ='hi';
		var a = '5';
		var a = '52ewfr';
		var a = '5.23eff';
		var a = '5.45frefes';
		var a = '2.34.43efesf';
		var a ='';
		var a = true;
		var a = false;
		var a ='false';
		var a = null;
		var a = undefined;

		//var n = Numder(a);
		var n = parseInt(a);
		//var n = parseFloat(a);
		console.log('值:',n);
		console.log('类型:',typeof(n));

		//isNaN()
		console.log(isNaN(80));
		console.log(isNaN('54'));
		console.log(isNaN('234fsdf'));
	</script>
</body>
</html>